package cn.jr.util;

import java.util.ArrayList;

public class PageHelper {
    private Integer dateCount;//数据总条数
    private Integer showNumber=10;//每页显示条数
    private Integer pageCount;//总页数
    private Integer pageIndex=1;//当前是第几页
    private ArrayList listIndex;//当前页的集合数据

    public Integer getDateCount() {
        return dateCount;
    }

    public void setDateCount(Integer dateCount) {
        this.dateCount = dateCount;
        getPageCount();
    }

    public Integer getShowNumber() {
        return showNumber;
    }

    /*public void setShowNumber(Integer showNumber) {
        this.showNumber = showNumber;
    }*/

    public Integer getPageCount() {
        pageCount=this.dateCount%this.showNumber==0?this.dateCount/this.showNumber:this.dateCount/this.showNumber+1;
        return pageCount;
    }

    /*public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }*/

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public ArrayList getListIndex() {
        return listIndex;
    }

    public void setListIndex(ArrayList listIndex) {
        this.listIndex = listIndex;
    }
}
